package com.atguigu.webadmin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.model.pojo.PaymentType;
import com.atguigu.webadmin.service.PaymentTypeService;
import com.atguigu.webadmin.mapper.PaymentTypeMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 梅超凡
* @description 针对表【payment_type(支付方式表)】的数据库操作Service实现
* @createDate 2024-11-13 17:18:25
*/
@Slf4j
@Service
public class PaymentTypeServiceImpl extends ServiceImpl<PaymentTypeMapper, PaymentType>
    implements PaymentTypeService{

    @Autowired
    private PaymentTypeMapper paymentTypeMapper;

    @Override
    public List<PaymentType> listPaymentType() {

        List<PaymentType> typeList = paymentTypeMapper.selectList(null);

        log.info("查询成功，结果为{}",typeList);
        return typeList;
    }

    @Override
    public void deletePaymentById(Long id) {
        paymentTypeMapper.deleteById(id);
    }
}




